define(['directives/directives'], function (directive) {
    'use strict';
    //history.back
    directive.directive('backButton', function () {
        return {
            restrict: 'A', link: function (scope, element, attrs) {
                element.bind('click', goBack);
                function goBack() {
                    history.back();
                    scope.$apply();
                }
            }
        }
    });

});